#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n , tag = 0 , teg = 0 , m = 300000 , v = 0 , u = 0;
int f[maxn];
int h[maxn];
int main()
{
    freopen("duel.in" , "r" , stdin);
    freopen("duel.out" , "w" , stdout);
    cin >> n;
    for (int i = 1 ; i <= n ; i++)
    {
        cin >> f[i];
        tag++;
    }
    if(tag == 1 || tag == 2)
    {
        cout << 1 << endl;
    }
    else
    {
        for (int a = 1 ; a <= n ; a++)
        {
            for (int j = a ; j <= n ; j++)
            {
                if(f[j] > f[a] && f[j] != 0 && f[a] != 0)
                {
                    h[j] = f[j];
                    teg++;
                }
                else if (f[j] = f[a])
                {
                    u++;
                }
            }
            for (int b = 1 ; b <= teg ; b++)
            {
                if(m > h[b])
                {
                            m = b;
                }
            }
            f[m] = 0;
        }
        for (int s = 1 ; s <= n ; s++)
        {
            if(f[s] != 0)
            {
                v++;
            }
        }
        if (v == 1)
        {
            cout << u << endl;
        }
        else if (v == n)
        {
            cout << 1 << endl;
        }
        else
        {
            cout << v << endl;
        }
    return 0;
    }
}
